//获取Select的Option数组
export function getSelectOption(data: any) {
  const options: {
    label: string;
    value: string;
    id: number;
    disabled: boolean;
  }[] = [];
  if (data) {
    Object.getOwnPropertyNames(data).map((item) =>
      options.push({
        label: data[item]?.text,
        value: item,
        disabled: data[item]?.disabled || false,
        id: data[item]?.id,
      })
    );
    return options;
  } else {
    return undefined;
  }
}
